<%@ include file="/common/jspHead.jsp"%><%--
--%><%@ page contentType="text/html;charset=UTF-8"%><%--
--%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><s:text name="admin_title"/></title>
<%@ include file="/common/cmm_meta_head.jsp"%>
<%@ include file="/common/admin_meta_head.jsp"%>
<script type="text/javascript">
<!--
	$(function(){
		var tbOptn = {
			url:'ajaxQuery.do',
			idField:"groupId",
            iconCls:'icon-save',
			frozenColumns:[[
                    {field:'ck',checkbox:true}
					]],
			columns:[[    
				{field:'groupId',title:'<s:text name="groupId"/>',sortable:true},    
				{field:'groupName',title:'<s:text name="groupName"/>'},    
				{field:'groupCrtDate',title:'<s:text name="groupCrtDate"/>',halign:"center",align:'right',formatter:fDateTimeclmnSet},
				{field:'opr',title:'<s:text name="tb_title_opr"/>',align:'center',formatter: foprclmnSet}
			]]
		}
		fLoadGrid("dg",tbOptn);
	});
	var foprclmnSet = function (value,row,index){
		var dat = '<a href="#" onclick="doEdit(\''+ row.groupId +'\')"><s:text name="btn_edit"/></a>&nbsp;&nbsp;<a href="#" onclick="doDel(\''+ row.groupId +'\',\'dg\',{groupId:\''+ row.groupId +'\'})"><s:text name="btn_del"/></a>';
		return dat;
	}

	function doQuery(){

		$('#dg').datagrid('load',{
			"param.groupId": $('#groupId').val(),  
			"param.groupName": $('#groupName').val()
		});  
	}

	function doEdit(id){
		var optn={
			title:'<s:text name="btn_edit"/>',
			width:500,
			height:300
		}
		var url='edit.do'
		if (id){
			url = 'edit.do?groupId='+id
		}
		msgJq = showWin(url,optn);
	}

//-->
</script>
</head>
<body>
<div id="tb">
	<span><s:text name="groupId"/>:</span>  
    <input id="groupId" name="groupId"/>  
    <span><s:text name="groupName"/>:</span>  
    <input id="groupName"  name="groupName">  
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="doQuery()"><s:text name="btn_seach"/></a>
	<BR>
	<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="doEdit()"><s:text name="btn_add"/></a>
	<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="doTitleEdit('dg','groupId')"><s:text name="btn_edit"/></a>
	<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="doTitleDel('dg','groupId')"><s:text name="btn_del"/></a>
</div>
<BR>
<table id="dg" title='<s:text name="title"/>'></table>

<FORM Name="FromOpr" Method="POST" id="FromOpr" Action="oprd.do">
<input type="hidden" name="DoOpr">
</form>
</body>
</html>